<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<div class="weui_tabbar1">
	<a href="<%=basePath %>${user.currUrl}<c:if test="${user.currUrl == '/xs'}">?sid=${user.parent.studentId}</c:if>" idx-data="0" class="weui_tabbar_item1 weui_bar_item_on">
		<div class="weui_tabbar_icon foot_icon1"></div>
		<p class="weui_tabbar_label">首页</p>
	</a>
	<a href="<%=basePath %>${user.currUrl}/message<c:if test="${user.currUrl == '/xs'}">?sid=${user.parent.studentId}</c:if>" idx-data="1" class="weui_tabbar_item1">
		<div class="weui_tabbar_icon foot_icon2"></div>
		<p class="weui_tabbar_label">消息</p>
	</a>
	<a href="<%=basePath %>${user.currUrl}/my<c:if test="${user.currUrl == '/xs'}">?sid=${user.parent.studentId}</c:if>" idx-data="2" class="weui_tabbar_item1">
		<div class="weui_tabbar_icon foot_icon3"></div>
		<p class="weui_tabbar_label">我的</p>
	</a>
</div>

<script type="text/javascript">
	$(function() {
		$(".weui_tabbar1 a").click(function() {
			window.localStorage.setItem("foot_item_count", $(this).attr("idx-data"));
		})
		var foot_item_count = window.localStorage.getItem("foot_item_count");
		if(foot_item_count != null) {
			$($(".weui_tabbar1").find("a")[parseInt(foot_item_count)]).addClass("weui_bar_item_on").siblings().removeClass("weui_bar_item_on");
		}
	})
</script>